"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.ProForm = ProForm;

var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));

var _jsxRuntime = require("react/jsx-runtime");

var _antdV = require("antd-v4");

var _BaseForm = require("../../BaseForm");

var _components = require("../../components");

function ProForm(props) {
  return (0, _jsxRuntime.jsx)(_BaseForm.BaseForm, (0, _objectSpread2.default)({
    layout: "vertical",
    submitter: {
      // 反转按钮，在正常模式下，按钮应该是主按钮在前
      render: function render(_, dom) {
        return dom.reverse();
      }
    },
    contentRender: function contentRender(items, submitter) {
      return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
        children: [items, submitter]
      });
    }
  }, props));
}

ProForm.Group = _components.Group;
ProForm.useForm = _antdV.Form.useForm;
ProForm.Item = _components.ProFormItem;
ProForm.useWatch = _antdV.Form.useWatch;
ProForm.ErrorList = _antdV.Form.ErrorList;
ProForm.Provider = _antdV.Form.Provider;